From c656a8f0db594a2a73a6187cfce8d78c1d29f2aa Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 30 Jun 2005 21:03:24 +0000 Subject: [PATCH] Olaf changes TEF to use UTF8 internally, fixes doc, tweaks tests. --- README | 18 +++++++++++++----- reference/route/tef_xml.sample.gpx | 2 +- tef_xml.c | 8 ++++---- testo | 6 ++---- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/README b/README index fda447651..b47d0f30c 100644 --- a/README +++ b/README @@ -788,11 +788,19 @@ THE FORMATS XHTML beyond recognition so use a better browser to save the pages such as Firefox or Mozilla. - TourExchangeFormat - - XML based export format, used by Map&Guide - "Motorrad-Routenplaner". This software can only export routing - data. So we don't support writing. + TEF + + TEF, internal called "TourExchangeFormat", is a XML based + export format, used by Map&Guide "Motorrad-Routenplaner 2005/06". + Another posibility to exchange data with this are the .bcr files, + which are sopprted by GPSbabel in both directions (see BCR). + Via XML this software can only export routing data. + So we don't support writing. + + With the option "routevia" you can eliminate calculated route + points from tef source file. + + gpsbabel -r -i tef,routevia -f in.xml -o gpx -F out.gpx PathAway diff --git a/reference/route/tef_xml.sample.gpx b/reference/route/tef_xml.sample.gpx index d55ae922a..969fcc283 100644 --- a/reference/route/tef_xml.sample.gpx +++ b/reference/route/tef_xml.sample.gpx @@ -5,7 +5,7 @@ creator="GPSBabel - http://www.gpsbabel.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd"> - + in Zedtwitz halb rechts halten auf B2 Hofer Strasse diff --git a/tef_xml.c b/tef_xml.c index 885e2d484..85308dbb4 100644 --- a/tef_xml.c +++ b/tef_xml.c @@ -116,11 +116,11 @@ tef_header(const char *args, const char **attrv) { if (strcmp(avp[0], "Name") == 0) { - route->rte_name = str_utf8_to_cp1252(avp[1]); + route->rte_name = xstrdup(avp[1]); } else if (strcmp(avp[0], "Software") == 0) { - route->rte_desc = str_utf8_to_cp1252(avp[1]); + route->rte_desc = xstrdup(avp[1]); } avp+=2; } @@ -218,11 +218,11 @@ tef_item_start(const char *args, const char **attrv) { if (0 == strcmp(avp[0], "PointDescription")) { - wpt_tmp->shortname = str_utf8_to_cp1252(avp[1]); + wpt_tmp->shortname = xstrdup(avp[1]); } if (0 == strcmp(avp[0], "SegDescription")) { - wpt_tmp->description = str_utf8_to_cp1252(avp[1]); + wpt_tmp->description = xstrdup(avp[1]); } if ((0 == strcmp(avp[0], "ViaStation")) && (0 == strcmp(avp[1], "true"))) { diff --git a/testo b/testo index dede59b06..c6ba99bdd 100755 --- a/testo +++ b/testo @@ -697,13 +697,11 @@ ${PNAME} -i geo -f geocaching.loc -o geo -F ${TMPDIR}/geocustom.out ${PNAME} -i geo -f geocaching.loc -o text -F ${TMPDIR}/text.out -o html -F ${TMPDIR}/html.out -o vcard -F ${TMPDIR}/vcard.out #-o palmdoc -F ${TMPDIR}/pd.out # -# TourExchangeFormat tef (read only) +# tef "TourExchangeFormat" read test # rm -f ${TMPDIR}/tef_xml* ${PNAME} -r -i tef -f reference/route/tef_xml.sample.xml -o gpx -F ${TMPDIR}/tef_xml.sample.gpx -grep -v "